# Required functions: `strs.mean`, `srs.mean` car=c(1,0,1,2,1,1,2,5,2,3,2,5); loc=c(rep("downtown",each=6),rep("suburbs",each=6)) cars=data.frame(loc,car) boxplot(car~loc,data=cars,main="cars by location") ni=rep(6,2); Ni=rep(15,2) # StRS strs.mean('cars',cars$car,cars$loc,ni,Ni) # SRS srs.mean('cars',cars$car,12,30)